import numpy as np
import noise


def diffuse_foreground(lsts,fqs):
    """
    Produce a (NTIMES,NFREQS) mock-up of what diffuse foregrounds could look
    like on a baseline of a provided geometric length.

    Args:
        lsts (array-like): shape=(NTIMES,), radians
            local sidereal times of the observation to be generated.
        fqs (array-like): shape=(NFREQS,), GHz
            the spectral frequencies of the observation to be generated.
            an interpolation object that returns the sky temperature as a
            function of (lst, freqs).  Called as Tsky_mdl(lsts, fqs).
    Returns:
        fgrd (array-like): shape=(NTIMES,NFREQS)
            mock diffuse foreground visibility spectra vs. time
        data_mean: average of background amplitude magnitude
    """
    fgrd = noise.white_noise((len(lsts),len(fqs)))
    data_mean = abs(fgrd).mean()
    return fgrd,data_mean



    

